#include <iostream>

template<typename T1,typename T2>
struct Pair
{
    Pair(const T1& first,const T2& second):first(first),second(second){}

    void show()
    {
        std::cout<<first<<" "<<second<<std::endl;
    }
    T1 first;
    T2 second;
};

//类模板的全特化
class Student_Pair : public Pair<int, std::string>
{
public:
    Student_Pair(int id, std::string name):Pair(id,name){}

private:

};
//偏特化
//用到类的时候就一定要加声明
template<typename T>
class HashNode:public Pair<int,T>
{
public:
    HashNode(int hashID,T value): Pair<int,T>(hashID,value){}
};



int main()
{
    //Pair<std::string,std::string> p("262班","zhangsan");
    // Student_Pair p(1,"zhangsan");
    // p.show();

    HashNode<std::string> h(1,"zhangsan");
    h.show();

    return 0;
}